<?php 



class Mail
{

	private $receiver;
	private $text;
	private $fullEmail;
	private $object;
	private $headers;
	
	function __construct($pObject,$pAddr, $pText, $pSignature)
	{
		  // Entête du mail:
		  $headers ='From: "KillingSpree"<admin@killingspree.fr>'."\n";
		  $headers .= 'Reply-To: admin@killingspree.fr'."\n";
		  $headers .= 'Organization: http://www.killingspree.fr'."\n";
		  $headers .= "MIME-version: 1.0\n";
		  $headers .= "Content-type: text/html; charset= utf-8\n";
		  $headers .='Content-Transfer-Encoding: 8bit';

		  $this->headers = $headers;
		  $this->fullEmail = $pText.$pSignature ;
		  $this->receiver = $pAddr;
		  $this->object = $pObject;
	}
	
	function send()
	{
		if(mail($this->receiver, $this->object, $this->fullEmail, $this->headers))
	     {
	         return true;
	     }
	     else
	     {
	          return false;
	     }
	}

}

?>